﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DATA;
using DTO;

namespace BUS
{
    public class NewsBUS
    {
        public List<NewsDTO> GetAllNews()
        {
             NewsREP news = new NewsREP();
             return news.GetAllNews();
        }

        public List<NewsDTO> GetActiveSubNews(int subPanelID)
        {
            NewsREP news = new NewsREP();
            return news.GetActiveSubNews(subPanelID);
        }

        public List<NewsDTO> GetActiveNews(int panelID)
        {
            NewsREP news = new NewsREP();
            return news.GetActiveNews(panelID);
        }

        public List<NewsDTO> GetActiveNewsWithType(int tID)
        {
            NewsREP news = new NewsREP();
            return news.GetActiveNewsWithType(tID);
        }

        public List<NewsDTO> GetActiveNewestNews()
        {
            NewsREP news = new NewsREP();
            return news.GetActiveNewestNews();
        }

        public NewsDTO GetNews(int newsID)
        {
            NewsREP news = new NewsREP();
            return news.GetNews(newsID);
        }

        public bool CountViewUp(int nID)
        {
            NewsREP news = new NewsREP();
            return news.CountViewUp(nID);
        }

        public bool AddNew(NewsDTO newn)
        {

            NewsREP news = new NewsREP();
            return news.AddNew(newn);
        }
        public void deleteNews(int newID)
        {
            NewsREP news = new NewsREP();
          
            news.deleteNews(newID);
        }
        public bool UpdateNew(NewsDTO accountup)
        {
            NewsREP news = new NewsREP();

            return  news.UpdateNew(accountup);
        }

    }
}
